#ifndef _PENDING_SCHEMA_H_
#define _PENDING_SCHEMA_H_

#include "/usr/include/mysql/mysql.h"
#include "schema_manager.h"
#include <list>
using namespace std;



struct url_t;

struct pending_schema_t
{
	bool quit;
	list<table_op_t*> table_ops[PENDING_SCHEMA_THREAD_COUNT];
	pthread_mutex_t lockers[PENDING_SCHEMA_THREAD_COUNT];
	pthread_cond_t conds[PENDING_SCHEMA_THREAD_COUNT];
};

int init_pending_schema(pending_schema_t& pending_schema);
void quit_pending_schema(pending_schema_t* pending_schema);

int add_to_pending_schema(void* url);//url_t*  
int remove_from_pending_schema(void* url); //url_t*
int exist_in_pending_schema(void* url); //url_t*

extern pending_schema_t g_pending_schema;


#endif
